﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Web;

/// <summary>
/// Summary description for Email
/// </summary>
public class Email
{
	public Email()
	{
		
	}

    public void sendEmail(string to, string cc, string subject, string content)
    {
        MailMessage message = new MailMessage();

        message.From = new MailAddress("Mail System <huaraco_wang@hotmail.com>");
        message.To.Add(new MailAddress(to));
        message.CC.Add(new MailAddress(cc));
        message.IsBodyHtml = true;
        message.Subject = subject;
        message.Body = content;

        SmtpClient client = new SmtpClient("smtp.live.com",587);
        client.Credentials = new System.Net.NetworkCredential("huaraco_wang@hotmail.com", "P@ssword");
        client.EnableSsl = true;
        client.Send(message);
    }

}